import { Radio, RadioChangeEvent, RadioGroupProps } from 'antd';

export default function RadioGroupWidget(props: RadioGroupProps) {
  const { onChange, ...res } = props;

  function handleChange(e: RadioChangeEvent) {
    onChange?.(e.target.value);
  }

  return <Radio.Group {...res} onChange={handleChange} />;
}
